home *** CD-ROM | disk | FTP | other *** search
/ Capture the Power of the Internet / Capture the Power of the Internet.iso / mac / MacFiles / System / Calculators / mathpad.sit / MathPad 2.5.2 / XFuns / readgray f / readgray test next >
MacBinary  |  2000-03-26  |  1.4 KB  |  [TEXT/MPad]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sat Mar 25 23:05:26 2000, modified Sat Mar 25 23:05:26 2000, creator 'MPad', type ASCII, 679 bytes "readgray test" , at 0x327 458 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPad]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 72 65 61 64 67 72 | 61 79 20 74 65 73 74 00 |..readgr|ay test.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 61 | 64 00 00 00 00 00 00 00 |.TEXTMPa|d.......|
|00000050| 00 00 00 00 00 02 a7 00 | 00 01 ca b5 03 3d 06 b5 |........|.....=..|
|00000060| 03 3d 06 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.=......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3d 9a 00 00 |........|....=...|
|00000080| 2d 2d 20 41 6e 79 20 50 | 49 43 54 20 66 69 6c 65 |-- Any P|ICT file|
|00000090| 20 77 69 6c 6c 20 62 65 | 20 63 6f 6e 76 65 72 74 | will be| convert|
|000000a0| 65 64 20 74 6f 20 61 6e | 20 61 72 72 61 79 20 6f |ed to an| array o|
|000000b0| 66 20 67 72 61 79 73 63 | 61 6c 65 20 76 61 6c 75 |f graysc|ale valu|
|000000c0| 65 73 20 61 74 20 74 68 | 65 20 72 65 73 6f 6c 75 |es at th|e resolu|
|000000d0| 74 69 6f 6e 20 73 70 65 | 63 69 66 69 65 64 2e 20 |tion spe|cified. |
|000000e0| 46 6f 72 20 74 68 69 73 | 20 65 78 61 6d 70 6c 65 |For this| example|
|000000f0| 20 74 68 65 20 73 6f 75 | 72 63 65 20 50 49 43 54 | the sou|rce PICT|
|00000100| 20 69 73 20 61 20 63 6f | 6c 6f 72 20 69 6d 61 67 | is a co|lor imag|
|00000110| 65 20 32 33 31 20 62 79 | 20 32 38 38 2e 0d 0d 2d |e 231 by| 288...-|
|00000120| 2d 20 72 65 61 64 20 69 | 6e 74 6f 20 61 20 73 6d |- read i|nto a sm|
|00000130| 61 6c 6c 65 72 20 61 72 | 72 61 79 0d 77 69 64 74 |aller ar|ray.widt|
|00000140| 68 3d 38 30 0d 68 65 69 | 67 68 74 3d 31 30 30 0d |h=80.hei|ght=100.|
|00000150| 72 65 61 64 67 72 61 79 | 28 22 74 65 73 74 2e 50 |readgray|("test.P|
|00000160| 49 43 54 22 2c 77 69 64 | 74 68 2c 68 65 69 67 68 |ICT",wid|th,heigh|
|00000170| 74 29 3a 0d 0d 2d 2d 20 | 70 6c 6f 74 20 74 68 65 |t):..-- |plot the|
|00000180| 20 61 72 72 61 79 0d 59 | 73 74 72 69 70 73 3d 7b | array.Y|strips={|
|00000190| 31 2c 31 2c 2e 37 7d 0d | 58 6d 69 6e 3d 30 3b 20 |1,1,.7}.|Xmin=0; |
|000001a0| 58 6d 61 78 3d 77 69 64 | 74 68 0d 59 6d 69 6e 3d |Xmax=wid|th.Ymin=|
|000001b0| 30 3b 20 59 6d 61 78 3d | 68 65 69 67 68 74 0d 5a |0; Ymax=|height.Z|
|000001c0| 6d 69 6e 3d 30 3b 20 5a | 6d 61 78 3d 32 35 35 0d |min=0; Z|max=255.|
|000001d0| 0d 69 6d 61 67 65 20 47 | 72 61 79 41 72 72 61 79 |.image G|rayArray|
|000001e0| 0d 0d 6e 65 77 61 78 69 | 73 0d 69 6d 61 67 65 20 |..newaxi|s.image |
|000001f0| 32 35 35 2d 47 72 61 79 | 41 72 72 61 79 20 20 2d |255-Gray|Array -|
|00000200| 2d 20 63 61 6c 63 75 6c | 61 74 65 20 6e 65 67 61 |- calcul|ate nega|
|00000210| 74 69 76 65 0d 0d 2d 2d | 20 41 20 73 69 6d 70 6c |tive..--| A simpl|
|00000220| 65 20 77 61 79 20 74 6f | 20 72 65 61 72 72 61 6e |e way to| rearran|
|00000230| 67 65 20 70 69 78 65 6c | 73 20 69 73 20 74 6f 20 |ge pixel|s is to |
|00000240| 64 65 66 69 6e 65 20 61 | 20 6e 65 77 20 61 72 72 |define a| new arr|
|00000250| 61 79 20 74 68 61 74 20 | 72 65 6d 61 70 73 20 69 |ay that |remaps i|
|00000260| 6e 64 65 78 20 76 61 6c | 75 65 73 2e 20 47 69 76 |ndex val|ues. Giv|
|00000270| 65 6e 20 61 6e 20 69 6e | 64 65 78 20 66 6f 72 20 |en an in|dex for |
|00000280| 74 68 65 20 6e 65 77 20 | 61 72 72 61 79 2c 20 63 |the new |array, c|
|00000290| 61 6c 63 75 6c 61 74 65 | 20 61 6e 20 69 6e 64 65 |alculate| an inde|
|000002a0| 78 20 69 6e 74 6f 20 74 | 68 65 20 6f 6c 64 20 6f |x into t|he old o|
|000002b0| 6e 65 2e 0d 0d 72 6f 74 | 61 74 65 28 41 29 5b 69 |ne...rot|ate(A)[i|
|000002c0| 78 2c 69 79 5d 20 3d 20 | 41 5b 77 69 64 74 68 2d |x,iy] = |A[width-|
|000002d0| 69 79 2b 31 2c 69 78 5d | 20 64 69 6d 5b 68 65 69 |iy+1,ix]| dim[hei|
|000002e0| 67 68 74 2c 77 69 64 74 | 68 5d 0d 0d 6e 65 77 61 |ght,widt|h]..newa|
|000002f0| 78 69 73 0d 59 6d 61 78 | 3a 3d 77 69 64 74 68 3a |xis.Ymax|:=width:|
|00000300| 0d 58 6d 61 78 3a 3d 68 | 65 69 67 68 74 3a 0d 69 |.Xmax:=h|eight:.i|
|00000310| 6d 61 67 65 20 72 6f 74 | 61 74 65 28 47 72 61 79 |mage rot|ate(Gray|
|00000320| 41 72 72 61 79 29 0d 00 | 00 00 00 00 00 00 00 00 |Array)..|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 01 00 00 00 01 64 | 00 00 00 64 00 00 00 66 |.......d|...d...f|
|00000390| c4 25 cf 1e e1 13 f6 07 | 09 f9 1b ef 2a e5 33 e0 |.%......|....*.3.|
|000003a0| 38 dd 36 de 30 e2 27 e7 | 1c ee 0f f6 01 fe f5 07 |8.6.0.'.|........|
|000003b0| 03 74 73 74 02 00 00 00 | 54 45 58 54 44 50 61 64 |.tst....|TEXTDPad|
|000003c0| 01 00 ff ff ff ff 00 00 | 00 01 cf 76 00 00 00 00 |........|...v....|
|000003d0| 00 00 54 45 58 54 44 50 | 61 64 01 00 ff ff ff ff |..TEXTDP|ad......|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 b3 9a a1 2e 00 00 | 02 54 00 00 01 8e 23 ea |........|.T....#.|
|00000400| 15 f2 05 fc f8 05 ea 0e | e0 14 db 17 da 18 db 17 |........|........|
|00000410| dd 16 e3 12 ee 0b fe 02 | 0e f6 1e ed 2a e5 31 e1 |........|....*.1.|
|00000420| 32 e1 2d e4 22 ea 14 f3 | 05 fc f5 07 e3 12 d3 1c |2.-."...|........|
|00000430| c7 23 c0 27 bb 2a b9 2c | ba 2b bf 28 c8 22 d7 19 |.#.'.*.,|.+.(."..|
|00000440| eb 0d 02 fe 1c ee 32 e1 | 42 d7 4a d2 4d d0 4a d2 |......2.|B.J.M.J.|
|00000450| 42 d7 34 df 23 ea 10 f5 | fe 02 ec 0d dd 16 d3 1c |B.4.#...|........|
|00000460| cf 1e cf 1e d1 1d d5 1b | de 15 eb 0d fc 03 0b f8 |........|........|
|00000470| 1b ef 27 e7 2e e3 2f e2 | 29 e6 1d ed 0e f6 ff 01 |..'.../.|).......|
|00000480| 00 00 00 20 01 00 03 03 | 00 02 3f f9 8e fa 35 12 |... ....|..?...5.|
|00000490| 94 e9 c8 ae 01 25 01 8d | 00 06 00 2b 00 ba 01 b7 |.....%..|...+....|
|000004a0| 01 37 00 2a 00 00 00 14 | 00 04 06 4d 6f 6e 61 63 |.7.*....|...Monac|
|000004b0| 6f 01 39 06 4d 6f 6e 61 | 63 6f 01 39 00 00 00 24 |o.9.Mona|co.9...$|
|000004c0| 3f 00 00 00 3f 00 80 e8 | 00 00 00 00 00 00 01 6a |?...?...|.......j|
|000004d0| 00 2d 00 00 00 00 00 00 | 03 8c 00 30 10 00 00 00 |.-......|...0....|
|000004e0| 00 00 80 e8 00 00 01 00 | 00 00 01 64 00 00 00 64 |........|...d...d|
|000004f0| 00 00 00 66 02 6b 73 98 | 03 fe 00 00 00 1c 00 5a |...f.ks.|.......Z|
|00000500| 00 02 50 52 65 66 00 00 | 00 1a 53 54 52 23 00 00 |..PRef..|..STR#..|
|00000510| 00 26 53 50 52 46 00 00 | 00 32 00 80 ff ff 00 00 |.&SPRF..|.2......|
|00000520| 00 00 02 6c 70 20 00 81 | 00 00 00 00 00 24 02 6b |...lp ..|.....$.k|
|00000530| 72 c0 00 80 ff ff 00 00 | 00 3c 02 6b 72 b4 0b 66 |r.......|.<.kr..f|
|00000540| 6f 6e 74 20 26 20 73 69 | 7a 65 00 00 00 00 00 00 |ont & si|ze......|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+